
from google.appengine.ext.db import djangoforms
from match.models import Match
from django import forms
from stadium.models import Stadium

HOURS = [
         ('10:00','10:00'),
         ('10:30','10:30'),
         ('11:00','11:00'),
         ('11:30','11:30'),
         ('12:00','12:00'),
]
class MatchNewForm(forms.ModelForm):

    stadiums = [(st.key().id(),st.name) for st in Stadium.all()] or [(1,'Estadio Unico')]
        
    name = forms.CharField(label="Nombre del Partido")
    hora = forms.CharField(widget=forms.Select(choices=HOURS))
    stadium = forms.CharField(label="Estadio",max_length=3,widget=forms.Select(choices=stadiums))
    date = forms.CharField(widget=forms.HiddenInput)    
